package cn.ulc.store.dao.goods;

import cn.ulc.common.constant.enums.AvailableStatus;
import cn.ulc.store.dao.BaseDao;
import cn.ulc.store.entity.goods.GoodsType;
import org.beetl.sql.core.annotatoin.SqlResource;

import java.util.List;

/*
* GoodsType
* gen by Jin mapper 2019-05-28
*/
@SqlResource("goods.goodsType")
public interface GoodsTypeDao extends BaseDao<GoodsType> {

    List<GoodsType> findList(String type, String name,AvailableStatus status, Long companyId);

    List<GoodsType> findAllList(Long companyId);

    List<GoodsType> findList(Long companyId,Long parentId);

    Integer findMaxSortByParentId(Long parentId);

    List<GoodsType> findBySort(Integer begin,Integer end,Long parentId,Long companyId);

    List<GoodsType> findListHaveGoods(Long companyId, AvailableStatus status);

    List<GoodsType> findListGoodsCount(Long companyId, AvailableStatus status);

    List<GoodsType> findListByParentId(Long companyId, AvailableStatus status,Long parentId);

    Long countByParentId(Long parentId);
}
